import React from 'react';
import './loading.less'
import { connect } from 'react-redux'

// import { makeStyles } from '@material-ui/core/styles';
// import CircularProgress from '@material-ui/core/CircularProgress';



function Loading(props) {
  // const classes = useStyles();

  return (
    <div className='loading' style={{ display: props.showLoading ? 'block' : 'none' }}>
      {/* <CircularProgress color="secondary" /> */}
      <i className='iconfont icon-loading2' />
    </div>
  );
}
const mapStateToProps = (state) => {
  return {
    showLoading: state.showLoading
  }
}

export default connect(mapStateToProps)(Loading);